<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>首页</title>
    <link rel="stylesheet" href="../css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">首页</div>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <p th:text="${msg}"></p>
            </li>
            <li class="layui-nav-item"><a th:href="@{/logOut}">注销</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">主要操作</a>
                    <dl class="layui-nav-child">
                        <dd th:if="${msg eq null}"><a th:href="@{/toLogin}">登录</a></dd>
                        <dd><a th:href="@{/page2}">page2</a></dd>
                        <dd><a th:href="@{/myself}">个人资料</a></dd>
                    </dl>
                </li>

                <div>
                    <li class="layui-nav-item" shiro:hasAnyPermissions="per:root,per:admin">
                        <a href="javascript:;">用户操作</a>
                        <dl class="layui-nav-child">
                            <dd><a th:href="@{/userList}">查看所有用户</a></dd>
                            <dd><a href="javascript:;">其他操作</a></dd>
                            <dd><a href="">其他操作二</a></dd>
                        </dl>
                    </li>
                </div>

                <li class="layui-nav-item" shiro:hasPermission="per:admin">
                    <a href="javascript:;">日志操作</a>
                    <dl class="layui-nav-child">
                        <dd><a th:href="@{/logList}">查询所有日志</a></dd>
                        <dd><a href="javascript:;">其他操作</a></dd>
                        <dd><a href="">其他操作二</a></dd>
                    </dl>
                </li>

                <li class="layui-nav-item"><a href="">其他</a></li>
                <li class="layui-nav-item"><a href="">其他</a></li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <iframe id="modularpage" name="modularpage" width="100%" height="90%" frameborder="0" scrolling="no" th:src="@{/iframe}">
        </iframe>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © layui.com - 底部固定区域
    </div>
</div>
<script src="../layui.js"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;

    });
</script>
</body>
</html>
